<?php
namespace Install\Controller;

use Think\Controller;

class CommonController extends Controller {
    protected $lock_file;
    public function _initialize() {
        $this->lock_file = './Data/install.lock';
        header('Content-Type: text/html; charset=UTF-8');
        if(ACTION_NAME != 'complete'){
            if(file_exist($this->lock_file)){
                die('程序已运行安装，如果你确定要重新安装，请先从FTP中删除Data/install.lock！');
                exit;
            }
        }
    }
}
